<template>
  <div style="height: 400px">
      <el-table
        :data="tableData"
        border
        style="width: 100%;margin: auto;text-align: center;line-height: normal">
        <el-table-column fixed prop="order_sn" label="订单编号"/>
        <el-table-column fixed prop="proname" label="商品名称"/>
        <el-table-column prop="receiver_name" label="收货人"/>
        <el-table-column prop="receiver_phone" label="收货人电话"/>
        <el-table-column prop="receiver_detail_address" label="地址"/>
        <el-table-column prop="total_amount" label="总价"/>
      </el-table>
      <div style="height: 50px;float: right">
        <el-button type="primary" @click="getQb">支付</el-button>
      </div>
  </div>
</template>

<script>
export default {
  name: "VerOrder",
  data () {
    return {
      active: 0,
      tableData: [],
      formLabelWidth: '120px',
      dialogFormVisible: false
    }
  },
  created() {
    this.getOrdrer();
  },
  methods: {
    getOrdrer(){
      let param=new URLSearchParams();
      param.append("id",sessionStorage.getItem("orderId"))
      this.$http.post("/front/order/selectOrderById",param).then(data => {
        this.tableData=data;
      })
    },
    getQb () {
      let id=sessionStorage.getItem('order_sn');
      let money=sessionStorage.getItem('money');
      console.log(id+"----"+money)
      window.open(`http://localhost:8000/front/pay/pays?orderId=${id}&shopMoney=${money}`)
    }
  }
}
</script>

<style scoped>

</style>
